<template>
  <div class="index-container">
    <button @click="demo">首页</button>
  </div>
</template>

<script>
  import { defineComponent } from 'vue'
  export default defineComponent({
    name: 'Index',
    data() {
      return {
        index: true,
        code: '',
      }
    },
    created() {
      if (this.index) {
        console.log('created')
        this.index = false
      }
    },
    methods: {
      demo() {
        console.log('次数')
      },
    },
  })
</script>

<style lang="scss" scoped></style>
